/*
  将下面异步代码使用 Promise 的方法改进
  尽量用看上去像同步代码的方式
  setTimeout(function () {
    var a = 'hello'
    setTimeout(function () {
      var b = 'lagou'
      setTimeout(function () {
        var c = 'I ♥ U'
        console.log(a + b +c)
      }, 10)
    }, 10)
  }, 10)
*/
let pro = new Promise(function (resolve, reject) {
    resolve(new  Promise(function (resolve, reject) {
        setTimeout(function () {
            var a = 'hello';
            resolve(a)
        },10)
    }))
});
pro.then(function (value) {
    return new  Promise(function (resolve, reject) {
        setTimeout(function () {
            var b = 'lagou';
            resolve(value + b)
        },10)
    })
}).then(function (value) {
    new  Promise(function (resolve, reject) {
        setTimeout(function () {
            var c = 'I ♥ U';
            resolve(console.log(value + c))
        },10)
    })
});
